package com.sihan.framework.etm.mapper.business;

import com.framework.mybatis.mapper.BaseMapper;
import com.sihan.framework.etm.dto.business.ExceptionListDTO;
import com.sihan.framework.etm.dto.business.ScrapReasonDTO;
import com.sihan.framework.etm.dto.business.ScrapStandingBookDTO;
import com.sihan.framework.etm.dto.business.ToolCheckRecordDTO;
import com.sihan.framework.etm.entity.business.ToolScrap;
import com.sihan.framework.etm.vo.business.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author gyz
 * @version 1.0
 * @since jdk1.8
 */
@SuppressWarnings("rawtypes")
@Mapper
public interface ScrapStandingBookMapper extends BaseMapper<ToolScrap,String> {

	List<ScrapStandingBookVO> selectPage(@Param(value = "param") ScrapStandingBookDTO dto);

	List<ExceptionListVO> selectExceptionkListPage(ExceptionListDTO dto);

	List<ScrapListVO> selectScrapListPage(ExceptionListDTO dto);

	BaseToolInfo getBaseToolMainInfo(@Param(value = "scrapId") String scrapId);

	ToolBuyInfo getToolBuyInfo(@Param(value = "toolCode")String toolCode);

	ScrapInfo getScrapInfo(@Param(value = "scrapId")String scrapId);

	List<ToolCheckRecordVO> getToolCheckRecode(ToolCheckRecordDTO dto);

	List<BaseToolInfo> getToolInfoById();

	int updateToolException(@Param(value = "id") String id);

	int addScrapRecord(Map map);

	int updateException(@Param(value = "id") String id);

	int deleleBytoolId(@Param(value = "toolId") String toolId);

	int updateScrapReason(ScrapReasonDTO dto);

	String getLatestScrapId(ScrapReasonDTO dto);

	String getToolIdBycode(@Param(value = "toolCode") String toolCode);
}
